home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / Vending.Dxr / 00025.ls < prev    next >
Encoding:
Text File  |  1997-11-18  |  963 b   |  46 lines

  1. on mouseDown
  2.   set the visible of sprite 27 to 1
  3.   updateStage()
  4.   wait(10)
  5.   repeat while the stillDown
  6.   end repeat
  7.   set the visible of sprite 27 to 0
  8.   updateStage()
  9. end
  10.  
  11. on mouseUp
  12.   global numnickel, numdime, answer, nickel, nickelCount, dimeCount, loopCounter
  13.   if (answer <> EMPTY) and (answer <> "one") then
  14.     set answer to EMPTY
  15.     puppetSound("buzz")
  16.     updateStage()
  17.     wait(30)
  18.     puppetSound(0)
  19.     getnext()
  20.     wait(30)
  21.     go(the frame)
  22.   end if
  23.   if answer = "one" then
  24.     set answer to EMPTY
  25.     if nickel = 1 then
  26.       set numnickel to numnickel + 1
  27.       delete line nickelCount of field "nickel"
  28.     else
  29.       set numdime to numdime + 1
  30.       delete line dimeCount of field "dime"
  31.     end if
  32.     puppetSound("Bluup.S")
  33.     updateStage()
  34.     wait(10)
  35.     puppetSound(0)
  36.     getnext()
  37.     wait(30)
  38.     set loopCounter to loopCounter + 1
  39.     if loopCounter = 5 then
  40.       go("win")
  41.     else
  42.       go(the frame)
  43.     end if
  44.   end if
  45. end
  46.